<template>
	<view class="content">
		<!-- 每一行的内容 -->
		<view class="box_top" v-for="(item,index) in lottery" :key="index">
			<!-- 图片 -->
			<view class="iamg">
				<image :src="`../../static/images/${item.lottery_id}.png`" mode=""></image>
			</view>
			<!-- 名称开奖日期 -->
			<view class="cainame">
				<text style="font-weight: 900;font-size: 20px;">{{item.lottery_name}}</text><br>
				<text style="font-size: 14px;color: gray;">{{item.remarks}}</text>
			</view>
			<!-- 小箭头 -->
			<view class="jian">
				>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// lottery: [
				// 	 {
				// 		lottery_id: "ssq",
				// 		lottery_name: "双色球",
				// 		lottery_type_id: "1",
				// 		remarks: "每周二、四、日开奖",
				// 		Image:"/static/images/ssq.png"
				// 	}, {
				// 		lottery_id: "dlt",
				// 		lottery_name: "超级大乐透",
				// 		lottery_type_id: "2",
				// 		remarks: "每周一、三、六开奖",
				// 		Image:"/static/images/dlt.png"
				// 	}, {
				// 		lottery_id: "qlc",
				// 		lottery_name: "七乐彩",
				// 		lottery_type_id: "1",
				// 		remarks: "每周一、三、五开奖",
				// 		Image:"/static/images/qlc.png"
				// 	}, {
				// 		lottery_id: "fcsd",
				// 		lottery_name: "福彩3D",
				// 		lottery_type_id: "1",
				// 		remarks: "每日开奖",
				// 		Image:"/static/images/pl3.png"
				// 	}, {
				// 		lottery_id: "qxc",
				// 		lottery_name: "七星彩",
				// 		lottery_type_id: "2",
				// 		remarks: "每周二、五、日开奖",
				// 		Image:"/static/images/qxc.png"
						
				// 	}, {
				// 		lottery_id: "pls",
				// 		lottery_name: "排列3",
				// 		lottery_type_id: "2",
				// 		remarks: "每日开奖",
				// 		Image:"/static/images/pl3.png"
						
				// 	}, {
				// 		lottery_id: "plw",
				// 		lottery_name: "排列5",
				// 		lottery_type_id: "2",
				// 		remarks: "每日开奖",
				// 		Image:"/static/images/pl5.png"
				// 	}
				// ] ,
				
				//彩票数组
				lottery:[]
			};
		},
		mounted() {
			this.getLott()
			
		},
		methods: {
			getLott(){
				uni.request({
					url:"http://api.aslegou.top/api/cptypelist",
					method:"GET",
					success:(res)=> {
						// console.log(res.data.list);
						this.lottery=res.data.list
					}
				})
			},
					}
	}
</script>

<style lang="scss">
	page {
		width: 100%;
		height: 100%;
		background-color: #ff5f7f;
	}

	.content {
		// width: 100%;
		// height: 100%;
		// background-color: #ff5f7f;
	}

	.box_top {
		width: 85%;
		height: 200rpx;
		margin: 10px auto;
		background-color: white;
		box-shadow: 2px 2px 2px white;
		border-radius: 5px;
		display: flex;
		justify-content: space-around;
		align-items: center;

		.iamg {
			width: 100rpx;
			height: 100rpx;
			margin-top: 40rpx;

			image {
				width: 100rpx;
				height: 100rpx;
				// line-height: 100rpx;
			}
		}
		.cainame{
			width: 300rpx;
			text-align: center;
		}
	}
</style>
